package com.jr.pojo;

import java.util.Date;

public class BookInfo {

    private Integer bookId; //id
    private String bookCode; //图书编号
    private String bookName; //图书名称
    private Integer bookType; //图书类型 -- 1 小说，2 文学，3 IT，4 艺术，5 科幻，6 管理
    private String bookAuthor; //图书作者

    private String publishPress; //出版社
    private Date publishDate; //出版日期
    private Integer isBorrow; //是否借阅 -- 0 未借阅，1 已借阅
    private String createBy; //创建人
    private Date creationTime; //创建时间

    private Date lastUpdateTime; //最新更新时间

    //无参构造
    public BookInfo() {
    }

    // 6个参 书籍查询用
    public BookInfo(Integer bookId, Integer bookType, String bookName,
                    String bookAuthor, Date publishDate, Integer isBorrow) {
        this.bookId = bookId;
        this.bookType = bookType;
        this.bookName = bookName;
        this.bookAuthor = bookAuthor;
        this.publishDate = publishDate;
        this.isBorrow = isBorrow;
    }

    //全参 11个
    public BookInfo(Integer bookId, String bookCode, String bookName, Integer bookType,
                    String bookAuthor, String publishPress, Date publishDate, Integer isBorrow,
                    String createBy, Date creationTime, Date lastUpdateTime) {
        this.bookId = bookId;
        this.bookCode = bookCode;
        this.bookName = bookName;
        this.bookType = bookType;
        this.bookAuthor = bookAuthor;
        this.publishPress = publishPress;
        this.publishDate = publishDate;
        this.isBorrow = isBorrow;
        this.createBy = createBy;
        this.creationTime = creationTime;
        this.lastUpdateTime = lastUpdateTime;
    }

    // 10个参，没有 bookId
    public BookInfo(String bookCode, String bookName, Integer bookType,
                    String bookAuthor, String publishPress, Date publishDate, Integer isBorrow,
                    String createBy, Date creationTime, Date lastUpdateTime) {
        this.bookCode = bookCode;
        this.bookName = bookName;
        this.bookType = bookType;
        this.bookAuthor = bookAuthor;
        this.publishPress = publishPress;
        this.publishDate = publishDate;
        this.isBorrow = isBorrow;
        this.createBy = createBy;
        this.creationTime = creationTime;
        this.lastUpdateTime = lastUpdateTime;
    }

    @Override
    public String toString() {
        return "BookInfo{" +
                "bookId=" + bookId +
                ", bookCode='" + bookCode + '\'' +
                ", bookName='" + bookName + '\'' +
                ", bookType=" + bookType +
                ", bookAuthor='" + bookAuthor + '\'' +
                ", publishPress='" + publishPress + '\'' +
                ", publishDate=" + publishDate +
                ", isBorrow=" + isBorrow +
                ", createBy='" + createBy + '\'' +
                ", creationTime=" + creationTime +
                ", lastUpdateTime=" + lastUpdateTime +
                '}';
    }

    public Integer getBookId() {
        return bookId;
    }

    public void setBookId(Integer bookId) {
        this.bookId = bookId;
    }

    public String getBookCode() {
        return bookCode;
    }

    public void setBookCode(String bookCode) {
        this.bookCode = bookCode;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public Integer getBookType() {
        return bookType;
    }

    public void setBookType(Integer bookType) {
        this.bookType = bookType;
    }

    public String getBookAuthor() {
        return bookAuthor;
    }

    public void setBookAuthor(String bookAuthor) {
        this.bookAuthor = bookAuthor;
    }

    public String getPublishPress() {
        return publishPress;
    }

    public void setPublishPress(String publishPress) {
        this.publishPress = publishPress;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public Integer getIsBorrow() {
        return isBorrow;
    }

    public void setIsBorrow(Integer isBorrow) {
        this.isBorrow = isBorrow;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
}
